#ifndef __JSONLIB_H
#define __JSONLIB_H
#include "stm32f4xx.h"
#include "stdlib.h"
#include "string.h"
#include "bsp_eth.h"
typedef struct{
	uint8_t id;
	uint8_t cmd;
	char *data;
	uint8_t respone;
}CmdData;
extern CmdData jsonbuf;
extern char strbuf[200];
uint8_t split(char *str,CmdData *data);
CmdData *JsonLoads(char *str);
static char *GetRespone(CmdData *data){
	if(data->cmd == 1){
		 sprintf(strbuf,"{\"id\":%d,\"cmd\":%d,\"data\":\"%d.%d.%d.%d\",\"respone\":%d}",data->id,data->cmd,lwipdev.ip[0],lwipdev.ip[1],lwipdev.ip[2],lwipdev.ip[3],200);
	}
	return strbuf;
}
#endif
